package com.lfsenior;

import javax.ws.rs.core.Application;
import java.util.HashSet;
import java.util.Set;

/**
 * Created by dlupan on 2018/9/17
 */
public class TestApplication extends Application{
    private Set<Object> singletons=new HashSet<Object>();
    private Set<Class<?>> empty=new HashSet<Class<?>>();


    public  TestApplication(){
        init();
    }

    private void init(){
        initRestfulServices();
    }

    private void initRestfulServices(){
        //添加Rest服务发布类
        empty.add(TestService.class);
    }

    @Override
    public Set<Object> getSingletons(){
        return singletons;
    }

    @Override
    public Set<Class<?>> getClasses(){
        return empty;
    }
}
